package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.CommentDaoImpl;
import com.asset.salesforce.domain.Comment;

@Service
@Transactional(readOnly=true)
public class CommentService {
	
	@Autowired
	private CommentDaoImpl commentDaoImpl;
	
	@Transactional(readOnly=false)
	public void addcomment(Comment comment) {
		commentDaoImpl.addcomment(comment);
	}
	
	public List<Comment> getAllcommentsByEmpId(Integer postId) {
		return commentDaoImpl.getAllcommentsByEmpId(postId);
		
	}

}
